const express = require('express');
const router = express.Router();
const tradeController = require('../controllers/trade');

// 获取交易记录
router.get('/', tradeController.getTrades);

// 获取当前持仓
router.get('/positions', tradeController.getPositions);

// 手动下单
router.post('/order', tradeController.createOrder);

// 取消订单
router.delete('/order/:id', tradeController.cancelOrder);

// 获取订单详情
router.get('/order/:id', tradeController.getOrderById);

module.exports = router;